﻿using GroceryList.Domain.Mapping;
using GroceryList.Domain.Model.GroceryList;
using GroceryList.Front.Web.Helpers;
using GroceryList.Model;
using NHibernate.Cfg;
using NHibernate.Tool.hbm2ddl;
using Xunit;

namespace GroceryList.Test
{    
    public class CreateDbTest
    {
	    [Fact]
        public void CreateDataBase()
	    {
            var cfg = new Configuration(); 
            cfg.Configure(); 
            cfg.AddAssembly(typeof(ListaCompra).Assembly);

            cfg.AddDeserializedMapping(NhMappingHelper.GetCompiledMappingFromAssembly(typeof(ListaCompraMap)), "Identifier");

            new SchemaExport(cfg).Execute(false, true, false); 
	    }
    }
}
